package com.loadmore.common.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.loadmore.common.db.gen.BookDao;
import com.loadmore.common.db.gen.DaoMaster;

import org.greenrobot.greendao.database.Database;

/**
 * Created by sunleilei on 2017/6/3.
 */

public class DaoOpenHelper extends DaoMaster.OpenHelper {
    public DaoOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }

    @Override
    public void onUpgrade(Database db, int oldVersion, int newVersion) {
        MigrationHelper.migrate(db, BookDao.class);
    }
}